package com.woniu.product.service;

import com.woniu.entity.PageResult;
import com.woniu.entity.Result;
import com.woniu.product.entity.dto.DisplayProductByConditionDTO;
import com.woniu.product.entity.dto.ProductSaleSortByUserDTO;
import com.woniu.product.pojo.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.product.pojo.Product;

import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author linxin
 * @since 2023-02-16
 */
public interface IProductService extends IService<Product> {

    PageResult<Product> querySearch(Integer currentPage, Integer pageSize, String productName);

    boolean queryProductStatus(Long id);

    List<Product> findByCategoryId(String productCategoryId);

    PageResult<Product> searchProduct(Integer currentPage, Integer pageSize, String productName);

    PageResult<Product> searchProductSort(Integer currentPage, Integer pageSize, ProductSaleSortByUserDTO productSaleSortByUserDTO);

    PageResult<Product> searchProductSortByCondition(Integer currentPage, Integer pageSize, DisplayProductByConditionDTO displayProductByConditionDTO);

    Product selectProductById(String id);

    int updateStock(String id, Integer productQuantity);
}
